<template>
	<view class="main">
		<u-navbar
		title=" " 
		:is-back="false"
		title-size="34"
		:border-bottom="false"
		:background="background">
			<view class="header">
				<u-icon name="arrow-left" size="28" @tap="black"></u-icon>
				<view class="title">资金账户</view>
				<view class="ritbtn" @tap="more">更多</view>
			</view>
		</u-navbar>
		<view class="content">
			<view class="title">账户余额</view>
			<view class="price">20.00</view>
			<view class="des">冻结余额 0.00</view>
		</view>
		<view class="btn">
			<button type="default" @tap="toPage('/pages/Account/withdraw')">提现</button>
			<button type="default" @tap="toPage('/pages/Account/recharge')">充值</button>
		</view>
		<u-popup v-model="more_show" mode="center" border-radius="8" z-index="99">
			<view class="more_cont">
				<view class="item" @tap="toPage('/pages/Account/transactionBill')">交易账单</view>
				<view class="item" @tap="toPage('/pages/Account/balanceDetails')">余额明细</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				background: {
					backgroundColor:"#4A90E2"
				},
				more_show:false,//是否显示更多弹窗
			}
		},
		onLoad() {
			
		},
		onShow() {
			
		},
		onPullDownRefresh() {
		    console.log('refresh');
		    setTimeout(function () {
		        uni.stopPullDownRefresh();
		    }, 1000);
		},
		methods: {
			// 点击更多
			more(){
				this.more_show = !this.more_show
			},
			//返回
			black(){
				uni.navigateBack()
			},
			toPage(url,islogin=false){
				this.more_show = false
				if(islogin){
					uni.navigateTo({
					    url: '/pages/Login/index'
					});
					return
				}
				uni.navigateTo({
				    url: url
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main{
		min-height: 100vh;
		padding:30rpx;
		background-color: #f9f9f9;
		.header{
			padding: 0 30rpx;
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #FFFFFF;
			font-weight: 400;
			color: #FFFFFF;
			line-height: 34rpx;
			.title{
				font-size: 34rpx;
			}
			.ritbtn{
				font-size: 28rpx;
				position: relative;
				z-index: 999999;
			}
		}
		.content{
			height: 521rpx;
			border-radius: 8rpx;
			background: #FFFFFF url(../../static/image/qiandai-tianchong.png)right bottom no-repeat;
			background-size: 100% 521rpx;
			display: flex;
			justify-content: center;
			flex-direction: column;
			text-align: center;
			view{
				margin-bottom: 30rpx;
			}
			.title{
				font-size: 32rpx;
				font-weight: 500;
				color: #333333;
				line-height: 45rpx;
			}
			.price{
				font-size: 48rpx;
				color: #E9AA00;
				line-height: 67rpx;
			}
			.des{
				font-size: 24rpx;
				font-weight: 500;
				color: #888888;
				line-height: 33rpx;
			}
		}
		.btn{
			margin-top: 30rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			button{
				width: 331rpx;
				height: 100rpx;
				background: #FFFFFF;
				border-radius: 50px;
				line-height: 100rpx;
				font-size: 34rpx;
				font-weight: 400;
				color: #333333;
				&::after{
					border: 0;
				}
				&:last-child{
					background: #4A90E2;
					color: #FFFFFF;
				}
			}
		}
		/deep/.u-drawer-center{
			top: calc(var(--status-bar-height) + 100rpx);
			right: 30rpx;
			bottom: auto;
			left: auto;
		}
		.more_cont{
			padding: 0 20rpx;
			position: relative;
			z-index: 999;
			.item{
				padding: 20rpx 26rpx;
				font-size: 28rpx;
				font-weight: 400;
				color: #333333;
				line-height: 40rpx;
				border-bottom: 1px solid #E6E6E6;
				&:last-child{
					border-bottom: 0;
				}
			}
		}
	}
</style>
